﻿@{
    ViewBag.Title = "DownloadManager";
}
@using Course;
@using Course.Models;
<html>
<head>
    <title>后台</title>
</head>
<body>
    <div id="body-wrapper">
        @RenderPage("../Shared/BackLeft.cshtml")
        <div id="main-content">
            <!-- Main Content Section with everything -->
            <noscript>
                <!-- Show a notification if the user has disabled javascript -->
                <div class="notification error png_bg">
                    <div>
                        Javascript is disabled or is not supported by your browser. Please <a href="http://browsehappy.com/"
                            title="Upgrade to a better browser">upgrade</a> your browser or <a href="http://www.google.com/support/bin/answer.py?answer=23852"
                                title="Enable Javascript in your browser">enable</a> Javascript to navigate
                        the interface properly. Download From <a href="http://www.exet.tk">exet.tk</a></div>
                </div>
            </noscript>
            <ul class="shortcut-buttons-set">
                <li><a class="shortcut-button" href="DownloadAdd"><span>
                    <img src="@Url.Content("~/Content/Images/icons/paper_content_pencil_48.png")" alt="icon" /><br />
                    添加下载</span></a></li>
            </ul>
            <div class="clear">
            </div>
            <!-- End .clear -->
            <div class="content-box">
                <!-- Start Content Box -->
                <div class="content-box-header">
                    <h3>
                        下载</h3>
                    <div class="clear">
                    </div>
                </div>
                                <div class="content-box-content">
                    <div class="tab-content default-tab" id="tab1">
                <div class="notification attention png_bg">
                    <a href="#" class="close">
                        <img src="@Url.Content("~/Content/Images/icons/cross_grey_small.png")" title="Close this notification" alt="close" /></a>
                    <div>
                        请注意修改下面内容
                    </div>
                </div>
                <table>
                    <thead>
                        <tr>
                            <th>
                                名字
                            </th>
                            <th>
                                下载地址
                            </th>
                            <th>
                            分类
                            </th>
                            <th>
                                排序
                            </th>
                            <th>
                                操作
                            </th>
                        </tr>
                    </thead>
                    <tfoot>
                        @{
                            IPagedList<Download> all = ViewData["all"] as IPagedList<Download>;
                        }
                    </tfoot>
                    <tbody>
                        @{
                            foreach (var download in all)
                            {
                            <tr>
                                <td>@download.DName
                                </td>
                                <td>@download.DUrl
                                </td>
                                <td>
                               @download.Category.CName
                                </td>
                                <td>
                                    @download.OrderNum
                                </td>
                                <td>
                                    <a href="DownloadEdit/@download.DownloadID" title="修改">
                                        <img src="@Url.Content("~/Content/Images/icons/pencil.png")" alt="Edit" /></a>
                                    <a href="DownloadDelete/@download.DownloadID" title="删除">
                                        <img src="@Url.Content("~/Content/Images/icons/cross.png")" alt="Delete" /></a>
                                </td>
                            </tr>
                            }
                            
                        }
                    </tbody>
                </table>
                @Html.Raw(Html.PagerBar(all, BarStyle.viciao))
            </div>
            <!-- End #tab1 -->
        </div>
        <!-- End .content-box-content -->
    </div>
    <!-- End .content-box -->
</body>
</html>
